*******************************************************************************************************************************
****Code for Replicating "Returning Veterans� Attitudes toward Democracy: Evidence from a Survey of Ukraine�s ATO Veterans"****
****by Konstantin Ash and Miroslav Shapovalov. Forthcoming in the Journal of Conflict Resolution.******************************
*******************************************************************************************************************************

***Descriptive Statistics Mentioned in Article Introduction***
#delimit;
use lif_shortened; ****Pre-2022 Trust in Army Leadership***;
tab  army_leadership_trust if  discussion_participant==0 |  group_number==1;
tab   army_leadership_better_problems if  discussion_participant==0 |  group_number==1;
clear;
use postinvasion_shortened;  ****Post-2022 Trust in Army Leadership***;
tab  trust_zsu_security;
tab  zsu_leaders_better_war;
tab  zsu_leaders_better_politics;
clear;

***Descriptive Statistics needed to replicate Figure 4***;

clear;
use veteran_survey_main;
tab democracy1 ato_survey, co;
tab democracy2 ato_survey, co;
tab ato_veterans_solve_conflict_bett ;
tab ato_veterans_solve_problems_bett ;


***Table 1 Compilation***;
clear;
insheet using servicehistory.csv;
replace service_change=0 if service_change==2;
tab division_en service_change if  bto_ng_volunteer==1;
tab division_en service_change if  pgm_volunteer==1;
tab division_en service_change if  army_reject_pgm_volunteer==1;
clear;
use veteran_survey_main;
total  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer if ato_survey==1;
total  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer if ato_survey==1 & service_change==1 &  servedinzsu==0;
tab oblast if ato_survey==1 & servedinzsu==0;
tab moved_from  oblast  if ato_survey==1 & servedinzsu==0;


****Table 2: Political Efficacy****;
ttest      efficacy1,by(ato_survey )
ttest      efficacy2,by(ato_survey )
ttest      efficacy3,by(ato_survey )
ttest      efficacy4,by(ato_survey )

clear;
use national_survey_2019;
sum efficacy1 efficacy2 efficacy3 efficacy4;
clear;
use veteran_survey_main;


***Table 3: Only Veteran Sample: No Controls and Mobilization as Baseline***;
oprobit democracy1  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo a1;
oprobit democracy2  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo a2;
oprobit  ato_veterans_solve_conflict_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo a3;
oprobit   ato_veterans_solve_problems_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo a4;
estout a1 a2 a3 a4 using democracy1b.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



***Table 4: Veteran and Lab in the Field Sample Together***;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu lviv if survey_2022==0 & pilot==0;
eststo b1;
oprobit democracy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu lviv if survey_2022==0 & pilot==0;
eststo b2;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 efficacy1 efficacy2 efficacy3 efficacy4 nodiff nobetter culturericher lviv if pilot==0;
eststo b3;
oprobit democracy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 efficacy1 efficacy2 efficacy3 efficacy4 nodiff nobetter culturericher lviv if pilot==0;
eststo b4;
estout b1 b3 b2 b4 using democracy2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table 5: Only Veteran Sample: Efficacy and Trust in 2014 Government***;
oprobit efficacy1 army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d1;
oprobit efficacy2 army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d2;
oprobit  efficacy3 army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d3;
oprobit   trust_before_entering_service army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d4;
estout d1 d2 d3 d4 using predemocracy3.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



*****************;
***APPENDIX******;
*****************;

****Table A1: Comparing Samples of Veteran, 2020, and 2019 Surves****;
sum age female education  survey_language_russian language_family language_native eu_agreement minsk2 revolution2004 revolution2014 if ato_survey==1;
sum age female education  survey_language_russian language_family language_native eu_agreement minsk2 revolution2004 revolution2014 if ato_survey==0 & reserve==0;
sum age female education  survey_language_russian language_family language_native eu_agreement minsk2 revolution2004 revolution2014 if ato_survey==0 & reserve==1;
clear;
use national_survey_2019;
sum age  female  education  survey_russian family_russian native_russian expenses income eu_agreement  minsk2 revolution2004 revolution2014;
sum age  female  education  survey_russian family_russian native_russian expenses income eu_agreement  minsk2 revolution2004 revolution2014 if cluster_type=="City 100-499 thousand" | cluster_type=="City 500-999 thousand" | cluster_type=="City over 1 million";
clear;

****Table A2: Differences between Reserves and Focus Group Participants***;

clear;
use veteran_survey_main;
ttest democracy1 if ato_survey==0,by(reserve);
ttest democracy2 if ato_survey==0,by(reserve);
ttest efficacy1 if ato_survey==0,by(reserve);
ttest efficacy2 if ato_survey==0,by(reserve);
ttest efficacy3 if ato_survey==0,by(reserve);
ttest eu_agreement if ato_survey==0,by(reserve);
ttest revolution2004 if ato_survey==0,by(reserve);
ttest revolution2014 if ato_survey==0,by(reserve);

***Table A3: Veteran and Lab in the Field Sample Together: Democracy Support with altering focus group Base cases***;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu reserve lviv if survey_2022==0 & pilot==0;
eststo r1;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu discussion lviv if survey_2022==0 & pilot==0;
eststo r2;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu reserve age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 efficacy1 efficacy2 efficacy3 efficacy4 nodiff nobetter culturericher lviv if pilot==0;
eststo r3;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu discussion age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 efficacy1 efficacy2 efficacy3 efficacy4 nodiff nobetter culturericher lviv if pilot==0;
eststo r4;
estout r1 r3 r2 r4 using democracy2_basecases.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


****Table A4: Samples from July 2019 and June 2022 National Surveys***;
clear;
use postinvasion_shortened;
sum age female education  survey_russian  language_native_russian language_family_russian income  revolution_future_2004 revolution_future_2014;
sum age female education  survey_russian  language_native_russian language_family_russian income  revolution_future_2004 revolution_future_2014 if cluster_population<4;


***Table A5: Additions to Figure 4 Descriptive Statistics from 2022 National Survey****;

tab democracy1;
tab democracy1 if cluster_pop<4;
tab democracy2;
tab democracy2 if cluster_pop<4;




***Table A6: Using 2022 Survey as Base for Public Opinion instead of Focus Groups***;

clear;
use veteran_survey_main;
gen rev2004xprime= revolution_2004_prime*revolution2004;
gen rev2014xprime= revolution_2014_prime*revolution2014;
#delimit;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer  revolution_2004_prime revolution_2014_prime lviv if ato_survey==1 | survey_2022==1;
eststo u1;
oprobit democracy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer  revolution_2004_prime revolution_2014_prime lviv if ato_survey==1 | survey_2022==1;
eststo u2;
oprobit democracy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer age female education income survey_language_russian revolution2004 revolution2014 ussr nodivisionbylanguage  revolution_2004_prime revolution_2014_prime rev2004xprime rev2014xprime lviv  if ato_survey==1 | survey_2022==1;
eststo u3;
oprobit democracy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer age female education income survey_language_russian revolution2004 revolution2014 ussr nodivisionbylanguage  revolution_2004_prime revolution_2014_prime rev2004xprime rev2014xprime lviv  if ato_survey==1 | survey_2022==1;
eststo u4;
estout u1 u3 u2 u4 using democracy2022.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

*** Table A7: Open-Ended Responses for Joining Specific Grouping***;

gen open_network=.;
gen open_notrust_zsu=.;
gen open_trust_zsu=.;
gen open_benefits=.;
gen open_get_to_front=.;

tab  open_network if army_volunteer==1;
tab  open_network if army_draft==1;
tab  open_network if bto_ng_volunteer==1;
tab  open_network if pgm_volunteer==1;
tab  open_network if army_reject_pgm_volunteer==1;

tab  open_notrust_zsu if army_volunteer==1;
tab  open_notrust_zsu if army_draft==1;
tab  open_notrust_zsu if bto_ng_volunteer==1;
tab  open_notrust_zsu if pgm_volunteer==1;
tab  open_notrust_zsu if army_reject_pgm_volunteer==1;

tab  open_trust_zsu if army_volunteer==1;
tab  open_trust_zsu if army_draft==1;
tab  open_trust_zsu if bto_ng_volunteer==1;
tab  open_trust_zsu if pgm_volunteer==1;
tab  open_trust_zsu if army_reject_pgm_volunteer==1;

tab  open_benefits if army_volunteer==1;
tab  open_benefits if army_draft==1;
tab  open_benefits if bto_ng_volunteer==1;
tab  open_benefits if pgm_volunteer==1;
tab  open_benefits if army_reject_pgm_volunteer==1;

tab  open_get_to_front if army_volunteer==1;
tab  open_get_to_front if army_draft==1;
tab  open_get_to_front if bto_ng_volunteer==1;
tab  open_get_to_front if pgm_volunteer==1;
tab  open_get_to_front if army_reject_pgm_volunteer==1;

***Table A8: Only Veteran Sample: Predictors of Open-Ended Responses***;
oprobit democracy1  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv open_network open_notrust_zsu open_trust_zsu open_benefits open_get_to_front if ato_survey==1 & servedinzsu==0;
eststo r1;
oprobit democracy2  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv open_network open_notrust_zsu open_trust_zsu open_benefits open_get_to_front if ato_survey==1 & servedinzsu==0;
eststo r2;
oprobit  ato_veterans_solve_conflict_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv  open_network open_notrust_zsu open_trust_zsu open_benefits open_get_to_front if servedinzsu==0;
eststo r3;
oprobit   ato_veterans_solve_problems_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv open_network open_notrust_zsu open_trust_zsu open_benefits open_get_to_front if servedinzsu==0;
eststo r4;
estout r1 r2 r3 r4 using democracy1r.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


*** Table A9: Close-ended Reasons for Joining - Desriptive ***;
replace part_of_right_cause=0 if part_of_right_cause==. & ato_survey==1;
replace country_called_i_responded=0 if country_called_i_responded==. & ato_survey==1;
replace official_status=0 if official_status==. & ato_survey==1;
replace take_care_of_family=0 if take_care_of_family==. & ato_survey==1;
replace dobrobat_simpler=0 if dobrobat_simpler==. & ato_survey==1;
replace zsu_simpler=0 if zsu_simpler==. & ato_survey==1;
replace no_contracts_dobrobat=0 if no_contracts_dobrobat==. & ato_survey==1;
replace zsu_useless=0 if zsu_useless==. & ato_survey==1;
replace fight_not_serve=0 if fight_not_serve==. & ato_survey==1;
replace defend_family_friends=0 if defend_family_friends==. & ato_survey==1;

tab  part_of_right_cause if army_volunteer==1;
tab  part_of_right_cause if army_draft==1;
tab  part_of_right_cause if bto_ng_volunteer==1;
tab  part_of_right_cause if pgm_volunteer==1;
tab  part_of_right_cause if army_reject_pgm_volunteer==1;

tab  country_called_i_responded if army_volunteer==1;
tab  country_called_i_responded if army_draft==1;
tab  country_called_i_responded  if bto_ng_volunteer==1;
tab  country_called_i_responded  if pgm_volunteer==1;
tab  country_called_i_responded  if army_reject_pgm_volunteer==1;

tab  official_status if army_volunteer==1;
tab  official_status if army_draft==1;
tab  official_status if bto_ng_volunteer==1;
tab  official_status if pgm_volunteer==1;
tab  official_status if army_reject_pgm_volunteer==1;


tab  take_care_of_family if army_volunteer==1;
tab  take_care_of_family if army_draft==1;
tab  take_care_of_family if bto_ng_volunteer==1;
tab  take_care_of_family if pgm_volunteer==1;
tab  take_care_of_family if army_reject_pgm_volunteer==1;


tab  dobrobat_simpler if army_volunteer==1;
tab  dobrobat_simpler if army_draft==1;
tab  dobrobat_simpler if bto_ng_volunteer==1;
tab  dobrobat_simpler if pgm_volunteer==1;
tab  dobrobat_simpler if army_reject_pgm_volunteer==1;


tab  zsu_simpler if army_volunteer==1;
tab  zsu_simpler if army_draft==1;
tab  zsu_simpler if bto_ng_volunteer==1;
tab  zsu_simpler if pgm_volunteer==1;
tab  zsu_simpler if army_reject_pgm_volunteer==1;


tab  no_contracts_dobrobat if army_volunteer==1;
tab  no_contracts_dobrobat if army_draft==1;
tab  no_contracts_dobrobat if bto_ng_volunteer==1;
tab  no_contracts_dobrobat if pgm_volunteer==1;
tab  no_contracts_dobrobat if army_reject_pgm_volunteer==1;


tab  zsu_useless if army_volunteer==1;
tab  zsu_useless if army_draft==1;
tab  zsu_useless if bto_ng_volunteer==1;
tab  zsu_useless if pgm_volunteer==1;
tab  zsu_useless if army_reject_pgm_volunteer==1;


tab  fight_not_serve if army_volunteer==1;
tab  fight_not_serve if army_draft==1;
tab  fight_not_serve if bto_ng_volunteer==1;
tab  fight_not_serve if pgm_volunteer==1;
tab  fight_not_serve if army_reject_pgm_volunteer==1;


tab  defend_family_friends if army_volunteer==1;
tab  defend_family_friends  if army_draft==1;
tab  defend_family_friends if bto_ng_volunteer==1;
tab  defend_family_friends if pgm_volunteer==1;
tab  defend_family_friends if army_reject_pgm_volunteer==1;


***Table A10: Only Veteran Sample: Close-Ended Reasons for Joining as Controls***;
oprobit democracy1  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv part_of_right_cause country_called_i_responded official_status take_care_of_family dobrobat_simpler zsu_simpler zsu_useless fight_not_serve defend_family_friends if ato_survey==1 & servedinzsu==0;
eststo s1;
oprobit democracy2  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv part_of_right_cause country_called_i_responded official_status take_care_of_family dobrobat_simpler zsu_simpler zsu_useless fight_not_serve defend_family_friends if ato_survey==1 & servedinzsu==0;
eststo s2;
oprobit  ato_veterans_solve_conflict_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv part_of_right_cause country_called_i_responded official_status take_care_of_family dobrobat_simpler zsu_simpler zsu_useless fight_not_serve defend_family_friends if servedinzsu==0;
eststo s3;
oprobit   ato_veterans_solve_problems_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv part_of_right_cause country_called_i_responded official_status take_care_of_family dobrobat_simpler zsu_simpler zsu_useless fight_not_serve defend_family_friends if servedinzsu==0;
eststo s4;
estout s1 s2 s3 s4 using democracy1s.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A11: Descriptive Statistics of First-Choice Close-Ended Responses***;
gen  part_of_right_cause_bin=  part_of_right_cause;
gen  country_called_i_responded_bin=  country_called_i_responded;
gen  fight_not_serve_bin=  fight_not_serve;
gen  defend_family_friends_bin=  defend_family_friends;
recode part_of_right_cause_bin (1=0) (2=0) (3=1);
recode country_called_i_responded_bin (1=0) (2=0) (3=1);
recode fight_not_serve_bin (1=0) (2=0) (3=1);
recode defend_family_friends_bin (1=0) (2=0) (3=1);

***Table A12: Regression on Suport for Democracy with First-Choice Closes-ended Reasons for Joiining****;
oprobit democracy1  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv     part_of_right_cause_bin country_called_i_responded_bin fight_not_serve_bin defend_family_friends_bin if ato_survey==1 & servedinzsu==0;
eststo t1;
oprobit democracy2  army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv    part_of_right_cause_bin country_called_i_responded_bin fight_not_serve_bin defend_family_friends_bin if ato_survey==1 & servedinzsu==0;
eststo t2;
oprobit  ato_veterans_solve_conflict_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv     part_of_right_cause_bin country_called_i_responded_bin fight_not_serve_bin defend_family_friends_bin if servedinzsu==0;
eststo t3;
oprobit   ato_veterans_solve_problems_bett army_volunteer bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv    part_of_right_cause_bin country_called_i_responded_bin fight_not_serve_bin defend_family_friends_bin if servedinzsu==0;
eststo t4;
estout t1 t2 t3 t4 using democracy1t.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A13: Preferences for Joining Other Branches ***;
sum hypothetical_pgm if army_volunteer==1;
sum hypothetical_bto if army_volunteer==1;
sum hypothetical_pgm  if army_draft==1;
sum hypothetical_bto if army_volunteer==1;
sum hypothetical_pgm if bto_ng_volunteer==1;
sum hypothetical_army if bto_ng_volunteer==1;
sum hypothetical_army if pgm_volunteer==1;
sum hypothetical_bto if pgm_volunteer==1;
sum hypothetical_army if army_reject_pgm_volunteer==1;
sum hypothetical_bto if army_reject_pgm_volunteer==1;

***Table A14: Only Veteran Sample: No Controls - ZSU Volunteers as Baseline***;

oprobit democracy1  army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo a1;
oprobit democracy2  army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo a2;
oprobit  ato_veterans_solve_conflict_bett army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo a3;
oprobit   ato_veterans_solve_problems_bett army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo a4;
estout a1 a2 a3 a4 using democracy1.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A15: Only Veteran Sample: Efficacy and Trust in 2014 Government ZSU Volunteer as Baseline***;

oprobit efficacy1 army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d1;
oprobit efficacy2 army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d2;
oprobit  efficacy3 army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d3;
oprobit   trust_before_entering_service army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d4;
estout d1 d2 d3 d4 using predemocracy2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 




***Table A16: Variance of Efficacy and Trust in Government Across Service History***;
ttest       efficacy1 if ato_survey==1,by(army_volunteer ); * lower than the rest
ttest       efficacy2 if ato_survey==1,by(army_volunteer ); * higher than the rest
ttest       efficacy3 if ato_survey==1,by(army_volunteer ); no difference

ttest       efficacy1 if ato_survey==1,by(army_draft ); no difference
ttest       efficacy2 if ato_survey==1,by(army_draft ); no difference
ttest       efficacy3 if ato_survey==1,by(army_draft ); no difference

ttest       efficacy1 if ato_survey==1,by(bto_ng_volunteer ); * lower than the rest
ttest       efficacy2 if ato_survey==1,by(bto_ng_volunteer ); no difference
ttest       efficacy3 if ato_survey==1,by(bto_ng_volunteer ); ^ higher than the rest

ttest       efficacy1 if ato_survey==1,by(pgm_volunteer ); ^ higher than the rest
ttest       efficacy2 if ato_survey==1,by(pgm_volunteer ); * lower than the rest
ttest       efficacy3 if ato_survey==1,by(pgm_volunteer ); no difference

ttest       efficacy1 if ato_survey==1,by(army_reject_pgm_volunteer ); * higher than the rest
ttest       efficacy2 if ato_survey==1,by(army_reject_pgm_volunteer );  ^ lower than the rest
ttest       efficacy3 if ato_survey==1,by(army_reject_pgm_volunteer ); no difference


ttest     trust_before_entering_service   if ato_survey==1,by(army_volunteer ); * higher than the rest
ttest     trust_before_entering_service   if ato_survey==1,by(army_draft ); no difference
ttest     trust_before_entering_service   if ato_survey==1,by(bto_ng_volunteer );) no difference
ttest     trust_before_entering_service   if ato_survey==1,by(pgm_volunteer);  ^ lower than the rest
ttest     trust_before_entering_service   if ato_survey==1,by(army_reject_pgm_volunteer ); no difference''







***Table A17: Veteran and Lab in the Field Sample Together: Efficacy***;
oprobit efficacy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if pilot==0 & survey_2019==0;
eststo c1;
oprobit efficacy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if pilot==0 & survey_2019==0;
eststo c2;
oprobit efficacy3    army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if pilot==0 & survey_2019==0;
eststo c3;
estout c1 c2 c3 using efficacy2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A18: Veteran and 2019 National Survey Sample Together: Efficacy***;
oprobit efficacy1  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if  survey_2019==1 | ato_survey==1;
eststo c1;
oprobit efficacy2  army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if  survey_2019==1 | ato_survey==1;
eststo c2;
oprobit efficacy3    army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian eu_agreement minsk2 revolution2004 revolution2014 nodiff nobetter culturericher lviv if  survey_2019==1 | ato_survey==1;
eststo c3;
estout c1 c2 c3 using efficacy2_national.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A19: Pre-Joining ATO Support for Democracy****;
ttest       maidan_inspired if ato_survey==1,by(army_volunteer); no difference;
ttest       hope_for_provisional_govt_change if ato_survey==1,by(army_volunteer); no difference
ttest       confidence_provisional_govt if ato_survey==1,by(army_volunteer ); no difference
ttest       elected_govt_2014_serves_interes if ato_survey==1,by(army_volunteer ); no difference


ttest       maidan_inspired if ato_survey==1,by(army_draft ); no difference
ttest       hope_for_provisional_govt_change if ato_survey==1,by(army_draft ); no difference
ttest       confidence_provisional_govt if ato_survey==1,by(army_draft ); no difference
ttest       elected_govt_2014_serves_interes if ato_survey==1,by(army_draft ); no difference


ttest       maidan_inspired if ato_survey==1,by(bto_ng_volunteer ); no difference
ttest       hope_for_provisional_govt_change if ato_survey==1,by(bto_ng_volunteer ); no difference
ttest       confidence_provisional_govt if ato_survey==1,by(bto_ng_volunteer ); no difference
ttest       elected_govt_2014_serves_interes if ato_survey==1,by(bto_ng_volunteer ); no difference


ttest       maidan_inspired if ato_survey==1,by(pgm_volunteer ); no difference
ttest       hope_for_provisional_govt_change if ato_survey==1,by(pgm_volunteer );  no difference
ttest       confidence_provisional_govt if ato_survey==1,by(pgm_volunteer ); no difference
ttest       elected_govt_2014_serves_interes if ato_survey==1,by(pgm_volunteer ); no difference


ttest       maidan_inspired if ato_survey==1,by(army_reject_pgm_volunteer ); ^ higher than the rest
ttest       hope_for_provisional_govt_change if ato_survey==1,by(army_reject_pgm_volunteer ); no difference
ttest       confidence_provisional_govt if ato_survey==1,by(army_reject_pgm_volunteer ); no difference
ttest       elected_govt_2014_serves_interes if ato_survey==1,by(army_reject_pgm_volunteer ); no difference

***Table A20: Only Veteran Sample: 2014 Support for Democracy***;
oprobit maidan_inspired army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d1;
oprobit hope_for_provisional_govt_change army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if ato_survey==1 & servedinzsu==0;
eststo d2;
oprobit  confidence_provisional_govt army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d3;
oprobit   elected_govt_2014_serves_interes army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer service_change lviv if servedinzsu==0;
eststo d4;
estout d1 d2 d3 d4 using predemocracy.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A21: Veteran and Lab in the Field Sample Together: Support for EU and Revolutions***;
oprobit eu_agreement army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian nodiff nobetter culturericher lviv if pilot==0;
eststo e1;
oprobit revolution2004 army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian  nodiff nobetter culturericher lviv if pilot==0;
eststo e2;
oprobit revolution2014 army_volunteer army_draft bto_ng_volunteer pgm_volunteer army_reject_pgm_volunteer servedinzsu age female education income survey_language_russian nodiff nobetter culturericher lviv if pilot==0;
eststo e3;
estout e1 e2 e3 using eu_revolution_veterans.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 




****Table A22: Svoboda as Determinant of Democracy Support among Veterans****;
ttest democracy1 if ato_survey,by(svoboda);
ttest democracy2 if ato_survey,by(svoboda);
ttest ato_veterans_solve_conflict_bett  if ato_survey,by(svoboda);
ttest ato_veterans_solve_problems_bett if ato_survey,by(svoboda);




*****New Variable Labels for Main Data****;
label var   time_resided_in_city "Time Resided in City";
label var     moved_from "Location Moved From";
label var      marital_status "Marital Status";
label var  angry_both_worried "Angry or Worried about 2014";
label var   voenkomat "Joined Through Voenkomat";
label var  contract  "Signed Contract";
label var  division  "Division Joined";
label var   army_volunteer "ZSU Volunteer";
label var   army_draft "ZSU Conscript";
label var    bto_ng_volunteer "BTO Volunteer";
label var    pgm_volunteer "Initial PGM Volunteer";
label var     army_reject_pgm_volunteer "ZSU-rejected PGM Volunteer";
label var     hypothetical_pgm "Would Join Volunteer Battalion";
label var     hypothetical_army "Would Join ZSU";
label var     hypothetical_bto  "Would Join BTO/National Guard";
label var      date_entered_service "Date Entered Service";
label var       service_change "Service Change";
label var   q33 "Emotions Chosen Toward Russian Citizens";
label var ruspeople_anger "Anger against Russian Citizens";
label var ruspeople_hate "Hatred against Russian Citizens";
label var ruspeople_contempt "Contempt against Russian Citizens";
label var ruspeople_fear "Fear against Russian Citizens";
label var ruspeople_disappointment "Disappointment against Russian Citizens";
label var ruspeople_shame "Shame against Russian Citizens";
label var ruspeople_regret "Regret against Russian Citizens";
label var ruspeople_sadness "Sadness against Russian Citizens";
label var ruspeople_sympathy "Sympathy against Russian Citizens";
label var ruspeople_love "Love against Russian Citizens";
label var ruspeople_admiration "Admiration against Russian Citizens";
label var ruspeople_joy "Joy against Russian Citizens";
label var ruspeople_pleasure "Pleasure against Russian Citizens";
label var ruspeople_pride "Pride against Russian Citizens";
label var ruspeople_amusement "Amusement against Russian Citizens";
label var ruspeople_indifference "Indifference against Russian Citizens";
label var  qq34 "Emotions Chosen Toward Russian Government";
label var  nobetterthanotherslavs "We are no better than other Slavs";
label var  nodiffrussianukrainian "No difference between Russian and Ukrainian";
label var  culturericherthanrussia"Our Culture is Richer than Russia";
label var  ussrourhistory "The History of the USSR is Our History";
label var  nodivisionbylanguage "We should not divide people based on Language";
label var   youngpeoplemustknowculture "Young People Must Know Ukrainian Culture";
label var   familydanger "Felt Family was in Danger in 2014";
label var   citydanger "Felt City was in Danger in 2014";
label var   russian_army_threat "Russian Army Threat at time of Joining";
label var   separatists_threat "Separatists Threat at time of Joining";
label var    maidan_inspired "Maidan Inspired me to Join";
label var     hope_for_provisional_govt_change "Hoped Provisional Government Would Lead to Change";
label var      confidence_provisional_govt "Confidence in Provisional Government";
label var       elected_govt_2014_serves_interes "2014 Government Served People's Interests";
label var       elected_govt_2019_serves_interes "2019 Government Serves People's Interests";
label var        support_zelensky_decisions "Support Zelensky's Decisions";
label var         current_govt_will_of_people "Current Government Represents Will of the People";
label var democracy1 "Democracy is best system";
label var democracy2 "Ukraine Rarely Elects Best People";
label var  trust_before_entering_service "Trusted Government Before Entering Service";
label var  trust_now "Trusted Government Now";
label var   vsu_deal_separatists_before"ZSU Could Deal With Separatists before I joined";
label var   vsu_deal_separatists_now "ZSU Could Deal With Separatists Now";
label var   vsu_deal_russian_army_before"ZSU Could Deal With Russian Army before I joined";
label var   vsu_deal_russian_army_now "ZSU Could Deal With Russian Army Now";
label var  army2014_corruption "Level of Corruption in ZSU in 2014";
label var  army2014_incompetence "Level of Incompetence in ZSU in 2014";
label var  army2014_lackofsupplies "Level of Undersupply in ZSU in 2014";
label var  army2014_badcommand "Level of Poor Leadership in ZSU in 2014";
label var  open_ended_join "Why Veteran Joined - Open Ended";
label var  close_ended_join "Why Veteran Joined - Close Ended";
label var servedinzsu "Served in ZSU before 2014";
label var ato_survey "Veteran Survey";
label var  survey_language_russian "Survey Taken in Russian";
label var  lviv  "Survey in Lviv";
label var   oblast_orig "Oblast of Enlistment";
label var  svoboda "Voted for Svoboda";
label var   revolution_2004_prime "2004 Revolution Prime";
label var   revolution_2014_prime "2014 Revolution Prime";
label var   survey_2022 "2022 Survey";
label var reserve "Lab-in-the-Field Reserve";
label var discussion "Lab-in-the-Field Focus Group Participant";
label var pilot2019  "Lab-in-the-Field Pilot Participant";
label var  part_of_right_cause "Close-Ended: Wanted to be part of right cause";
label var   survey_2019 "2019 Survey";
label var   country_called_i_responded "Close-Ended: Country called I answered";
label var   official_status "Close-Ended: Official Status";
label var   take_care_of_family "Close-Ended: Wanted to be part of right cause";
label var   dobrobat_simpler "Close-Ended: Simpler to join PGM";
label var  zsu_simpler "Close-Ended: Simpler to join ZSU";
label var   no_contracts_dobrobat "Close-Ended: No contrats with PGM";
label var   zsu_useless "Close-Ended: ZSU was Useless";
label var   defend_family_friends "Close-Ended: Defend Family and Friends";
label var   fight_not_serve "Close-Ended: Wanted to Fight and Not Serve";
label var  open_network "Open-Ended: Knew people in division";
label var  open_notrust_zsu "Open-Ended: Did not trust ZSU";
label var  open_trust_zsu "Open-Ended: Trusted ZSU";
label var  open_benefits "Open-Ended: Financial Benefits";
label var  open_get_to_front "Open-Ended: Wanted to get to front";
label var   part_of_right_cause_bin "First Choice: Part of Right Cause";
label var    country_called_i_responded_bin "First Choice: Country called I answered";
label var     fight_not_serve_bin "First Choice: Wanted to Fight and Not Serve";
label var      defend_family_friends_bin "First Choice: Defend Family and Friends";

